<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>
<!DOCTYPE HTML>
<html>
<head>
<title>应许之地——萝卜丝之家</title>
<link rel="stylesheet" type="text/css" href="css/public.css">
<link href="css/detail.css" rel="Stylesheet" type="text/css" />
<link href="css/bottom.css" rel="Stylesheet" type="text/css" />

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/tab_select.js">
</script>
    <script language="javascript">
    	function change(id){
			$.getJSON("listHelpCategory.action", {categoryPid:id} ,function callback(json){
				$("#subCategoryId option").remove();
				$.each(json.helpCategoryJSONArray, function(i,item){
					$("#subCategoryId").append("<option value=\"" + item.id + "\">" + item.categoryName + "</option>");
			     });
			});
		}
		</script>
</head>

<body class="user">
<div class="main">
	<%@include file = "../include/top.jsp"%>

    <div class="content">
    	<%@include file = "../include/left.jsp"%>
        <div id="publishHelpPage" class="art">
        	<%@include file = "../include/tab_help.jsp"%>
            <form action="updateHelpInformation.action" method = "post" id = "form" class="send_msg helps">  
            	<s:hidden name="helpInformation.id"></s:hidden>   
            <div class="bd">
            	           
                    <p class="addressed"><label>分类：</label><select class="" name = "helpInformation.categoryId" onchange="change(this.options[this.options.selectedIndex].value)"><s:iterator value="helpCategoryList" id="entity"><option <s:if test="%{helpCategory.categoryPid == categoryId}">selected</s:if> value = "${categoryId}">${categoryName}</option></s:iterator></select><select id = "subCategoryId" class="" name = "subCategoryId"><s:iterator value="helpSubCategoryList" id="entity"><option <s:if test="%{helpCategory.categoryId == categoryId}">selected</s:if> value = "${categoryId}">${categoryName}</option></s:iterator></select></p>
                    <p><label>标题：</label><input class="tit_inp" type="text" name = "helpInformation.title"  value = "${helpInformation.title}" /></p>
                    <p style="padding-bottom:5px;"><label>内 容：</label><FCK:editor instanceName="helpInformation.content" width="500" 
						toolbarSet="Basic">
						<jsp:attribute name="value">
						${helpInformation.content}
              			  </jsp:attribute>
					</FCK:editor></p> 
                    <p><label>联系方式：</label><input class="tel_inp" type="text" name = "helpInformation.contact" value="${helpInformation.contact}" /></p>
                    <p>
                        <label>状态：</label><select name = "helpInformation.status">
						  <option  <s:if test="%{helpInformation.status == 1}">selected</s:if> value ="1">生效</option>
						  <option  <s:if test="%{helpInformation.status == 0}">selected</s:if> value ="0">删除</option>
						</select>
					</p>
					
					</div>
                    <p><button class="summit" >发 送</button></p>
                    </form>
                   
            </div>
        </div>
	</div>
    <%@include file = "../bottom.jsp"%>
</div>

</body>
</html>